<?php
$beirtnev = $_SESSION['username'];
require_once 'dbconnect.php';
mysql_query("UPDATE users SET status='0' WHERE username='$beirtnev'");
session_destroy();
header('location: index.php?show=main');
?>